home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / Notification Stuff ƒ / GestaltTalk / GestaltTalkSelector.c < prev   
Text File  |  1992-06-19  |  531b  |  26 lines

  1. /*
  2.  
  3.     GestaltTalkSelector.c
  4.     ---------------------
  5.     
  6.     This selector returns the address to GestaltTalk globals,
  7.     which includes a pointer to the data buffer.
  8.     
  9. */
  10.  
  11. pascal OSErr GestaltTalkGestalt(long selector, long *response)
  12. {
  13.     
  14.     asm {
  15.             bsr.s     @skipStorage        ; skip over the data and push address
  16.             dc.l    0x00                ; this is the gestaltTalk globals record
  17.             dc.l    0x00                ;
  18.             dc.l    0x00
  19.             dc.l    0x00
  20.             dc.l    0x00
  21.         @skipStorage:
  22.             movea.l    response,a0
  23.             move.l    (sp)+,(a0)            ; put the address of data into response
  24.     }
  25.     return     0;
  26. }